package com.name.givename.dao;

import com.github.pagehelper.Page;
import com.name.givename.dto.BonusInfoDTO;
import com.name.givename.entity.UserAndBonusEntity;
import com.name.givename.entity.UserBonusInfoEntity;
import com.name.givename.entity.UserInfoEntity;

import java.util.List;

public interface UserBonusInfoEntityMapper {
    int deleteByPrimaryKey(Integer bonusId);

    int insert(UserBonusInfoEntity record);

    UserBonusInfoEntity selectByPrimaryKey(Integer bonusId);

    List<UserBonusInfoEntity> selectAll();

    int updateByPrimaryKey(UserBonusInfoEntity record);

    UserBonusInfoEntity getUserWinMoney(String openId);

    void batchInsert(List<UserBonusInfoEntity> userBonusInfoEntities);

    List<BonusInfoDTO> getRedPackList(Long currentDate);

    Page<UserAndBonusEntity> getUserAndBonus();

    void updateBonusTime(Long currentDate);

    List<UserAndBonusEntity> userBonusCounts(String openId);

}